package xyz.talentboy.common.bean;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MainMenu {
	
	private static final Logger  logger = LoggerFactory.getLogger(MainMenu.class);
	
	private List<FirstButton> button = new ArrayList<>();

	public MainMenu add(FirstButton firstButton){
		button.add(firstButton);
		if(button.size() > 3){
			logger.warn("菜单数量已经超过3 个 将只返回前三个");
			button = button.subList(0, 3);
		}
		return this;
	}
	
	public List<FirstButton> getButton() {
		return button;
	}
	
}
